#ifndef __PTHREAD_POOL__
#define __PTHREAD_POOL__

#include "zzh_header.h"
#include "tidArr.h"
#include "taskQueue.h"
#include "fileOperation.h"
#include "mysql_conn.h"
#include "loginSys.h"
#include "dirFunc.h"
#include <mysql/mysql.h>
typedef struct threadPool_s{
    // 子线程的信息
    tidArr_t tidArr;
    // 任务队列
    taskQueue_t taskQueue;
    // 锁
    pthread_mutex_t mutex;
    //条件变量
    pthread_cond_t cond;
    // 退出标志位
    int exitFlag;
    // 添加数据连接池
    ConnectionPool_t *mysql_pool;
}threadPool_t;
int threadPoolInit(threadPool_t *pthreadPool,int workerNum);
int tcpInit(char *ip, char *port);
int epollAdd(int epfd, int fd);
int epollDel(int epfd, int fd);
int makeWorker(threadPool_t *pthreadPool);
#endif
